theme: Make spinner drawing start with the solid line
authorBenjamin Otte <otte@redhat.com>
Sat, 5 Mar 2011 13:53:26 +0000 (14:53 +0100)
committerBenjamin Otte <otte@redhat.com>
Sat, 5 Mar 2011 14:03:56 +0000 (15:03 +0100)
Previously, for i == 0, we were drawing the translucent line first.
However, people reading the code would always assume the solid line is
indicated by the current step. So make the code do that.

Note that the spinner now rotates in the wrong direction. This will be
fixed in a future commit.

gtk/gtkthemingengine.c

index 2fdec7335a01f75e76ff5eb37039895171dd99a6..bac646bdcbb8d533246e3654da87ec5388205304 100644 (file)
@@ -3003,8 +3003,8 @@ gtk_theming_engine_render_activity (GtkThemingEngine *engine,
           gint inset = 0.7 * radius;
 
           /* transparency is a function of time and intial value */
-          gdouble t = (gdouble) ((i + num_steps - step)
-                                 % num_steps) / num_steps;
+          gdouble t = 1.0 - (gdouble) ((i + num_steps - step)
+                                       % num_steps) / num_steps;
           gdouble xscale = cos (i * G_PI / half);
           gdouble yscale = sin (i * G_PI / half);